using System;
using System.Collections.Generic;
using System.Text;

using AIFSDataAccessLayer;

using AIFSCMSDataAccessLayer;
using AIFSCMSDataAccessLayer.RepositoryImpl;

using AIFSContentManagementSystem.Articles;
using AIFSContentManagementSystem.Criteria;

namespace AIFSCMSFacade
{
    public class AifsCmsServiceBuilder
    {
        /// <summary>
        /// Do not allow this class be instantiated with out the use of static methods
        /// </summary>
        private AifsCmsServiceBuilder(){}

        public static ArticleService GetArticleService(IDataExecutionContext DataExecutionContext)
        {
            IParser parser = new Parser();
            DataAwareRepositoryMap map = new DataAwareRepositoryMap(DataExecutionContext);

            ArticleService service = new ArticleService(map, parser);            
            return service;            
        }

        public static CriteriaService GetCriteriaService(IDataExecutionContext DataExecutionContext)
        {            
            DataAwareRepositoryMap map = new DataAwareRepositoryMap(DataExecutionContext);
            CriteriaService service = new CriteriaService(map);
            return service;
        }
    }
}
